<template>
  <div class="usedCarInfoItem">
    <header class="flex-row">
      <vue-img :src="avatar" class="avatar"></vue-img>
      <div class="right flex-grow">
        <div class="flex-row flex-between">
          <div class="name" style="position:relative; top:5px;">
            <strong>{{ userName }}</strong>
            <div class="com-bao_guo_hu" v-if="isTransfer"></div>
          </div>
          <div class="rightText">{{ rightText }}</div>
        </div>
      </div>
    </header>

    <main>
      <div v-for="(item, index) in info" :key="index" class="row">
        <span>{{ item.title }}：</span>
        <span :class="{ showy: item.showy }">{{ item.value }}</span>
      </div>
    </main>
  </div>
</template>

<script>
export default {
  props: ['avatar', 'userName', 'rightText', 'isTransfer', 'info'],

  data (){
    return {
      
    }
  },

  methods: {
      
  }
}
</script>

<style lang="less" scoped>
.showy{
  color: @info;
}

.usedCarInfoItem{
  margin: 10px 0;
  padding: 10px;
  box-sizing: border-box;
  background-color: white;
  color: @subtext;
  font-size: 15px;

  header{
    .right{
      margin-left: 10px;

      .row{
        margin-top: 5px;
      }
    }
  }

  .name{
    font-size: 16px;
    color: initial;
  }

  .avatar{
    width: 62px;
    height: 62px;
    border-radius: 50%;
  }

  .rightText{
    color: @danger;
    font-size: 22px;
  }

  main{
    margin-left: 72px;
    margin-bottom: -20px;
    position: relative;
    top: -20px;
  }
}
</style>